package maven;

import cn.hutool.core.io.file.FileReader;

import java.util.List;
import java.util.Optional;

/**
 * @Author 史祥连
 * @Date 2024/1/31 11:52
 * @Version 1.0
 */
public class FindNoUserJar {
    public static void main(String[] args) {


        FileReader fileReader = new FileReader("C:/Datas/maven/ai_core");
        FileReader useJarFile = new FileReader("C:\\Users\\LENOVO\\AppData\\Roaming\\JetBrains\\IntelliJIdea2022.3\\scratches\\dangan\\usejar");
        List<String> useJarList = useJarFile.readLines();
        List<String> containsJarList = fileReader.readLines();

        for (String containsJar : containsJarList) {
            String s = containsJar.split(":")[1];
            Optional<String> first = useJarList.stream().filter(useJar -> useJar.startsWith(s)).findFirst();
            if (!first.isPresent()) {
                System.out.println(s);
            }
        }
    }
}
